﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace InControl
{
    public partial class INV_initpeople_form : Form
    {
        public INV_initpeople_form()
        {
            InitializeComponent();
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            ((INV_MDIParent)this.MdiParent).OpenForm(typeof(INV_home_form));
        }

        private void pictureBox4_Click(object sender, EventArgs e)
        {
            if (((INV_MDIParent)this.MdiParent).appDriver.group == "administrators")
            {
                ((INV_MDIParent)this.MdiParent).OpenForm(typeof(INV_people_form));
            }
            else
            {
                Error_form ef = new Error_form();
                ef.richTextBox1.Text = "insufficient privileges";
                ef.ShowDialog(this);
            }
        }

        private void pictureBox2_Click(object sender, EventArgs e)
        {
            ((INV_MDIParent)this.MdiParent).OpenForm(typeof(INV_editpeople_form));
        }

        private void label1_Click_1(object sender, EventArgs e)
        {
            pictureBox2_Click(sender, e);
        }

        private void EI_Label_Click(object sender, EventArgs e)
        {
            pictureBox4_Click(sender, e);
        }
    }
}
